package com.net.xpay.common.dao.sync;

import com.net.xpay.common.domain.sync.CommonPayTransBatch;
import com.net.xpay.common.model.TransStatModel;
import com.net.common.dao.Page;
import com.net.common.dao.PagedMapper;
import com.net.common.annotation.DataShard;
import com.net.xpay.core.model.PayTransBatchSearchModel;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;

@DataShard("")
@Repository
public interface CommonPayTransBatchMapper extends PagedMapper<Long, CommonPayTransBatch> {
    List<CommonPayTransBatch> search(@Param("searchModel") PayTransBatchSearchModel searchModel, @Param("page") Page page);

    long searchCount(@Param("searchModel") PayTransBatchSearchModel searchModel);

    long sumTotalPaidAlipayUserCount(@Param("minEndTime") LocalDateTime minEndTime, @Param("maxEndTime") LocalDateTime maxEndTime);

    long sumTotalVeryAlipayUserCount();

    long sumTotalReceiveAlipayCount();

    TransStatModel sumTransStat(@Param("minEndTime") LocalDateTime minEndTime, @Param("maxEndTime") LocalDateTime maxEndTime);

    List<Long> listTotalVeryMerchantIds();

    long statPayTransActivePartnerCount(@Param("minEndTime") LocalDateTime minEndTime, @Param("maxEndTime") LocalDateTime maxEndTime);
}
